/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.wx.entity;

import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import com.jeesite.common.utils.excel.fieldtype.CompanyType;
import com.jeesite.common.utils.excel.fieldtype.OfficeType;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 用户表Entity
 * @author wangjianxin
 * @version 2018-09-27
 */
@Table(name="wx_user", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="user_name", attrName="userName", label="user_name", queryType=QueryType.LIKE),
		@Column(name="nick_name", attrName="nickName", label="nick_name", queryType=QueryType.LIKE),
		@Column(name="age", attrName="age", label="age"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="wx_open_id", attrName="wxOpenId", label="wx_open_id"),
		@Column(name="phone", attrName="phone", label="phone"),
		@Column(name="city", attrName="city", label="city"),
		@Column(name="sex", attrName="sex", label="sex"),
		@Column(name="head_img", attrName="headImg", label="head_img"),
		@Column(name="dis_invite_pic", attrName="disInvitePic", label="想赚钱二维码"),
		@Column(name="dis_money_value", attrName="disMoneyValue", label="分销总钱数"),
		@Column(name="attend_activityIds", attrName="attendActivityIds", label="用户涉及的活动",queryType=QueryType.LIKE),
	}, orderBy="a.update_date DESC"
)
public class WxUser extends DataEntity<WxUser> {
	
	private static final long serialVersionUID = 1L;
	private String userName;		// user_name
	private String nickName;		// nick_name
	private Long age;		// age
	private String wxOpenId;		// wx_open_id
	private String phone;		// phone
	private String city;		// city
	private Long sex;		// sex
	private String headImg;

	private String disInvitePic;

	private String disMoneyValue;

	private String attendActivityIds;

	//灵活字段，查询时候出来的 用户的每个活动里面下限人数
	private String disInviteNum;

	public WxUser() {
		this(null);
	}

	public WxUser(String id){
		super(id);
	}

	@ExcelFields({@ExcelField(
			title = "用户昵称",
			attrName = "nickName",
			align = ExcelField.Align.CENTER,
			sort = 40
	), @ExcelField(
			title = "真实姓名",
			attrName = "userName",
			align = ExcelField.Align.LEFT,
			sort = 50
	), @ExcelField(
			title = "手机号码",
			attrName = "phone",
			align = ExcelField.Align.CENTER,
			sort = 60
	)})
	
	@Length(min=0, max=200, message="user_name长度不能超过 200 个字符")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@Length(min=0, max=200, message="nick_name长度不能超过 200 个字符")
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	
	public Long getAge() {
		return age;
	}

	public void setAge(Long age) {
		this.age = age;
	}
	
	@NotBlank(message="wx_open_id不能为空")
	@Length(min=0, max=500, message="wx_open_id长度不能超过 500 个字符")
	public String getWxOpenId() {
		return wxOpenId;
	}

	public void setWxOpenId(String wxOpenId) {
		this.wxOpenId = wxOpenId;
	}
	
	@Length(min=0, max=200, message="phone长度不能超过 200 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=200, message="city长度不能超过 200 个字符")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	public Long getSex() {
		return sex;
	}

	public void setSex(Long sex) {
		this.sex = sex;
	}

	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	public String getDisInvitePic() {
		return disInvitePic;
	}

	public void setDisInvitePic(String disInvitePic) {
		this.disInvitePic = disInvitePic;
	}

	public String getDisMoneyValue() {
		return disMoneyValue;
	}

	public void setDisMoneyValue(String disMoneyValue) {
		this.disMoneyValue = disMoneyValue;
	}

	public String getDisInviteNum() {
		return disInviteNum;
	}

	public void setDisInviteNum(String disInviteNum) {
		this.disInviteNum = disInviteNum;
	}

	public String getAttendActivityIds() {
		return attendActivityIds;
	}

	public void setAttendActivityIds(String attendActivityIds) {
		this.attendActivityIds = attendActivityIds;
	}
}